home *** CD-ROM | disk | FTP | other *** search
- *******************************************************************
- SQL Server 2000 SQL Scan Tool (Sqlscan.exe) 3.0 for Microsoft SQL
- Server 2000 and Microsoft SQL Server 2000 Desktop Engine (MSDE 2000)
- February 09, 2003
- *******************************************************************
- ⌐ Microsoft Corporation 2003. All rights reserved.
- *******************************************************************
- Contents
- 1.0 Liability Disclaimer
- 2.0 Introduction
- 3.0 Syntax
- 4.0 Examples
- 5.0 SQL Scan Messages and Output
- 6.0 Language Mapping Tables
-
- **********************************************************************
- 1.0 Liability Disclaimer
- **********************************************************************
- Microsoft is providing SQL Scan, to detect computers that are
- vulnerable to the Slammer worm. This tool is provided AS-IS, with no
- warranties of any kind, either express or implied. You should evaluate
- and test the tool before using it in your environment.
-
- As a prerequisite to using this tool, you are required to accept the
- End Users License Agreement (EULA). The EULA is located in the root
- directory where you downloaded the SQL Critical Update Package the
- License.txt.
-
- *******************************************************************
- 2.0 Introduction
- *******************************************************************
- *NOTE: This tool is under continuing development. Future versions may
- be released in the near future.
-
- SQL Scan (Sqlscan.exe) locates instances of Microsoft SQL Server 2000
- and MSDE 2000 on Windows NT 4.0, Windows 2000, Windows XP Professional
- Edition, or later. SQL Scan scans an individual computer, a Windows
- Domain, or a specific range of IP addresses. In addition SQL Scan
- identifies instances of SQL Server 2000 and MSDE 2000 that may be
- vulnerable to the Slammer worm.
-
- *NOTE: SQL Scan must be run against a computer attached to a network;
- stand-alone machines will run the tool, but will not report
- vulnerabilities û instance status will be reported as unknown or
- unreachable.
-
- *NOTE: The minimum system requirement to launch SQL Scan is Windows
- 2000.
-
- *NOTE: Shutting down an infected instance may not complete
- successfully. You may need to use system management tools or manual
- intervention to terminate the process.
-
- SQL Scan does not locate instances of SQL Server 2000 and MSDE 2000
- that are running on Windows 98, Windows ME, or Windows XP Home
- Edition. In addition, SQL Scan does not detect instances of SQL Server
- that were started from the command prompt.
-
- SQL Scan enumerates all instances of SQL Server 2000 and MSDE 2000
- across a network. SQL Scan requires one of the following items as
- input:
- 1) A domain
- 2) A range of IP addresses
- 3) A single machine name
-
- SQL Scan requires the user to be a domain administrator when it is
- used to target remote machines. Otherwise, you must be an
- administrator on the local machine.
-
- SQL Scan will not return a conclusive result if either the
- ssnetlib.dll or sqlserver.exe files are renamed. You must name these
- files back to their original names before running this tool.
-
- SQL Scan identifies vulnerable SQL Server instances on clustered
- machines, but does not disable them. Disabling and shutting down of
- SQL instances must be managed manually on these machines.
-
- SQL Scan attempts to identify the MSDE product code and MSDE package
- code, if applicable to the instance being evaluated. You can find a
- list of recognized MSDE product codes at
- http://support.microsoft.com/default.aspx?kbid=311762 .
-
- *******************************************************************
- 3.0 Syntax
- *******************************************************************
- sqlscan [-v] [-c] {-d <domain> | -m <computer> | [-n] [-t
- <milliseconds>] -b <start ip> [-e <end ip> | -k <subnet mask>]} [-s]
-
- Parameters and parameter values must be separated by a space.
-
- -v Return verbose results. Verbose results include file version
- information for sqlservr.exe and ssnetlib.dll, instances of SQL Server
- 2000 and MSDE 2000, and instances of SQL Server and MSDE 2000 that are
- not vulnerable to the Slammer worm. *NOTE: Unless verbose results (-v)
- are specified, only vulnerable servers are reported.
-
- -c CSV output. Output is returned in CSV style text to facilitate the
- loading and analysis of results by spreadsheet and database
- applications. See section "5.0 SQL Scan Messages and Output" for
- details.
-
- *NOTE: if you use ûc you do not need to use ûv. Verbose results are
- automatically returned with ûc.
-
- -d <domain> Specifies the domain to scan. SQL Scan uses the current
- domain by default. For computers that are not members of a domain,
- specify a range of IP addresses or a computer name. You should only
- pass in the domain name and not the fully qualified DNS entry.
- Entering a fully qualified DNS name (i.e. 'test.microsoft.com' rather
- than just 'test') results in an error 87 indicating the parameter is
- not valid. If the computer is not in a domain, or if you specify a
- domain that does not exist (for example, a workgroup), you receive the
- following error:
- ERROR: error occurred and halted processing 6118
- 6118 is defined as ERROR_NO_BROWSER_SERVERS_FOUND and has as a
- description, "The list of servers for this workgroup is not currently
- available."
-
- -m <computer> Specifies the computer to scan.
-
- -n Resolve IP addresses to computer names. This option changes the
- computer name output from an IP address to a computer name.
-
- -t <milliseconds> Specifies the time to wait (in milliseconds) for
- each IP address resolution. The default is 1000 (10 seconds). NOTE:
- The -t option only works when SQL Scan is run from a computer using
- Windows XP. This parameter is recommended for a large IP address range
- to improve performance.
-
- -b <IP address> Specifies starting IP address of an IP range to scan.
- (Must be lower than the ûe parameter)
-
- -e <IP address> Specifies ending IP address of an IP range to scan.
- (Must be higher than the ûb parameter)
-
- -s Shut down and disable vulnerable instances.
-
- *NOTE: Information returned by running SQL Scan is sent to stdout. You
- can redirect the output to a text file by using the redirection
- features of your operating system. For more information see, "Command
- Redirection Operators" in Windows XP Help or "Redirection Overview" in
- Windows 2000 Help.
-
- **********************************************************************
- 4.0 Example
- **********************************************************************
- To detect, shut down, and disable all vulnerable instances of SQL
- Server in a domain and record the results in a file called output.txt,
- type the following command in the command prompt window from the
- directory in which you installed Sqlscan.exe:
-
- sqlscan ûv -s -m <servername> > output.txt
- To detect, shut down, and disable all vulnerable instances of SQL
- Server in a workgroup with a specific range of IP addresses and record
- the results in a file called output.txt, type the following command in
- the command prompt window from the directory in which you installed
- Sqlscan.exe:
-
- sqlscan ûv ûn ûb 146.24.2.1 ûe 146.24.2.5 -s > output.txt
-
- To return verbose results in CSV style text to a file called
- output.txt, type the following command in the command prompt window
- from the directory in which you installed sqlscan.exe:
-
- sqlscan ûc ûm <servername> > output.txt
-
- *******************************************************************
- 5.0 SQL Scan Messages and Output
- *******************************************************************
- For each machine that is scanned, the following is reported:
-
- Scanning: <servername> (platform = %s, version = %s)
-
- The following sections describe the various output messages that can
- be expected for discovered instances of SQL Server 2000 and MSDE 2000.
-
- 5.1 The message below indicates a SQL Server or MSDE instance is
- vulnerable to the Slammer worm. Use the verbose mode switch (-v) to
- receive this level of output:
- FOUND: sqlservr.exe @productversion=%s @fileversion=%s found:
- ssnetlib.dll @productversion=%s @fileversion=%s
- ACTION REQUIRED FOR THIS INSTANCE! Run the SQL Critical Update
- Utility. See readme for details.
- server=%s instance=%s version=%s language=%s MSDEProductCode=%s
- MSDEPackageName=%s platform=%s os=%s
-
- 5.2 The message below indicates that a SQL Server or MSDE instance is
- not vulnerable to the Slammer worm, but does not have the recommended
- level of security patches installed:
- FOUND: sqlservr.exe @productversion=%s @fileversion=%s found:
- ssnetlib.dll @productversion=%s @fileversion=%s
- Action Recommended for this instance. Run the SQL Critical Update
- Utility. See readme for details.
- server=%s instance=%s version=%s language=%s MSDEProductCode=%s
- MSDEPackageName=%s platform=%s os=%s
-
- 5.3 The message below indicates that a SQL Server or MSDE instance is
- not vulnerable to the Slammer worm and also that it has the
- recommended level of security patches applied:
- FOUND: sqlservr.exe @productversion=%s @fileversion=%s found:
- ssnetlib.dll @productversion=%s @fileversion=%s
- No need to run the SQL Critical Update utility for this instance at
- this time.
- server=%s instance=%s version=%s language=%s MSDEProductCode=%s
- MSDEPackageName=%s platform=%s os=%s
-
- 5.4 The message below indicates that SQL Scan was unable to determine
- if a SQL Server or MSDE instance was vulnerable or not vulnerable to
- the Slammer worm:
- WARNING: Unable to determine sqlservr version.
- server=%s instance=%s version=%s language=%s MSDEProductCode=%s
- MSDEPackageName=%s platform=%s os=%s
-
- *NOTE: You may see the above message if you have renamed or replaced
- files in your SQL Server 2000 or MSDE 2000 installation. You may also
- see this message if you are running disconnected from a network.
-
- 5.5 The following message is displayed when the user does not have
- permission to scan the machine. SQL Scan requires local administrator
- privileges on computers that it scans. When it scans a domain or range
- of IP addresses, these rights may be individually assigned on every
- computer or included in the rights of a group -- for example, domain
- administrators.
- UNREACHABLE: server=%s instance=? version=? language=?
- MSDEProductCode=? MSDEPackageName=? platform=UNKNOWN os=0.0, error
- 0x00000035
-
- 5.6 The message below represents the output that you can expect when
- you apply the CSV output switch (-c) to request formatted output:
- "Machine Name","Instance Name","Status","SQL Version","Product
- Level","Language","MSDE Product Code","MSDE Package
- Name","sqlservr.exe Product","sqlservr.exe File","ssnetlib.dll
- Product","ssnetlib.dll File","Platform","OS Version"
- (The following section repeats for each instance)
- "<server name>","<instance name>","<status>","<SQL version>","<product
- level>","<language code>","<MSDE product code>","<MSDE package
- name>","<sqlservr.exe version>","<sqlservr.exe file
- version>","<ssnetlib.dll version>","<ssnetlib.dll file
- version>","<platform>","<OS version>"
-
- Example:
- "myserver1","MSSQLSERVER","UP TO
- DATE","8.0","SP3","1033","N/A","N/A","8.00.760","2000.080.0760.00","8.
- 00.760","2000.080.0760.00","NT","5.1"
-
- *NOTE: "Status" will indicate one of the following:
- "VULNERABLE" û "ACTION REQUIRED FOR THIS INSTANCE! Run the SQL
- Critical Update Utility. See readme for details."
- "UP TO DATE" û "No need to run the SQL Critical Update utility for
- this instance at this time."
- "RECOMMEND PATCH" û "Action Recommended for this instance. Run the SQL
- Critical Update Utility. See readme for details."
- "UNKNOWN" - "WARNING: Unable to determine sqlservr version."
- "Unknown Connection Error" - <there was an error attempting to connect
- to the machine>
- "Unknown SSNetLib Version" û "WARNING: Unable to determine ssnetlib
- version."
-
- *NOTE: Additional documentation on MSDE Product Code and MSDE Package
- Name can be found at
- http://support.microsoft.com/default.aspx?kbid=321185 and in Appendix
- A of the SQL Critical Update Kit readme.txt.
-
- *******************************************************************
- 6.0 Language Mapping Tables
- *******************************************************************
- SQL Scan specifies the language of each instance of SQL Server 2000
- and MSDE 2000 that it identifies. The language is identified by the
- following language codes:
-
- Chinese (T) 1028
- German 1031
- English 1033
- Spanish 1034 or 3082
- French 1036
- Italian 1040
- Japanese 1041
- Korean 1042
- Dutch (Netherlands) 1043
- Portuguese (Brazil) 1046
- Swedish 1053
- Chinese (S) 2052
-